package io.adrainty.bolee.security.feign;

import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.security.hystrix.CompanyFeignHystrix;
import io.adrainty.bolee.security.models.entity.CompanyEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>ICompanyFeign</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description ICompanyFeign
 * @since 2025/8/1 14:13:35
 */

@FeignClient(value = "security-web", path = "/company-feign", fallback = CompanyFeignHystrix.class)
public interface ICompanyFeign {

    /**
     * 刷新缓存
     * @return ResultDTO<Boolean>
     */
    @GetMapping("/refreshCompanyWebsiteCache")
    ResultDTO<Boolean> refreshCompanyWebsiteCache();

    /**
     * 获取企业信息
     * @param companyNo 企业编号
     * @return ResultDTO<CompanyEntity>
     */
    @GetMapping("/findCompanyEntity/{companyNo}")
    ResultDTO<CompanyEntity> findCompanyEntity(@PathVariable("companyNo") String companyNo);

}
